<?php
/**
 * Created by PhpStorm.
 * User: Azrael
 * Date: 2016/2/23
 * Time: 23:23
 */

namespace Home\Logic;


use Home\Model\LiaotianModel;

class LiaotianLogic
{
    private $model = null;

    public function __construct()
    {
        $this->model = new LiaotianModel();
    }

    /**
     * 获取普通消息
     * @param $time
     * @param $fid
     * @param $msgtype
     * @return bool
     */
    public function getCommonMsg($time,$fid,$msgtype){
        $list = $this->model->getLiaotian($time,$fid,$msgtype);
        if(!$list){
            return false;
        }
        foreach($list as $k => $v){
            $data[$v['shtime']] = $v;
        }
        sort($data);
        return $data;
    }
}